Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(airflow): retry callback, support ExternalTaskSensor subclasses #8514

Merged

Conversation

richenc
Copy link
Contributor

@richenc richenc commented Jul 27, 2023

… add properties

Closes #6305.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jul 27, 2023
@hsheth2 hsheth2 requested a review from asikowitz August 10, 2023 00:25
@hsheth2
Copy link
Collaborator

hsheth2 commented Aug 10, 2023

@richenc This was a long-standing gap in our Airflow plugin, so thanks for taking a stab at it!

We'll be reviewing it soon.

@richenc
Copy link
Contributor Author

richenc commented Oct 12, 2023

@hsheth2 I noticed the v2 plugin released recently. I was wondering how that affects my PR.

@hsheth2
Copy link
Collaborator

hsheth2 commented Oct 15, 2023

@richenc this PR still applies for the v1 plugin and we can merge review/merge it in around v1 if we want. However, the v2 plugin uses the Airflow listener API (instead of the somewhat hacky policy mechanism that v1 uses), so we should be able to detect UP_FOR_RETRY events more reliably with v2.

The external sensor changes seem reasonable and are part of common code between v1 and v2, so that logic should be ok to merge regardless

@richenc richenc force-pushed the richenc-airflow-plugin-improvements branch from b3b193a to 92fb5c5 Compare October 17, 2023 07:31
@richenc
Copy link
Contributor Author

richenc commented Oct 17, 2023

@richenc this PR still applies for the v1 plugin and we can merge review/merge it in around v1 if we want. However, the v2 plugin uses the Airflow listener API (instead of the somewhat hacky policy mechanism that v1 uses), so we should be able to detect UP_FOR_RETRY events more reliably with v2.

The external sensor changes seem reasonable and are part of common code between v1 and v2, so that logic should be ok to merge regardless

@hsheth2 good to hear that the listener API is being used! I think that means it might be possible to emit the data flow runs as dataprocessinstances! I'm going to look into the v2 plugin so I can migrate and contribute to it in the future.

I just rebased my branch to fix the conflicts. Please let me know if there is anything else I need to do before this can be merged.

Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good

Do you have a sense for how we'd implement something similar with the v2 plugin (using the listener API)?

@richenc
Copy link
Contributor Author

richenc commented Oct 24, 2023

The code looks good

Do you have a sense for how we'd implement something similar with the v2 plugin (using the listener API)?

thanks @hsheth2! At the moment, I'm not sure but I was thinking about taking a crack at it once I had some time to test the v2 plugin in our local environment in preparation for migrating.

@hsheth2 hsheth2 added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label Oct 25, 2023
@hsheth2 hsheth2 changed the title feat(airflow): retry callback, support ExternalTaskSensor subclasses,… feat(airflow): retry callback, support ExternalTaskSensor subclasses Oct 27, 2023
@hsheth2 hsheth2 merged commit 8b1d209 into datahub-project:master Oct 27, 2023
44 checks passed
@richenc richenc deleted the richenc-airflow-plugin-improvements branch October 27, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata merge-pending-ci A PR that has passed review and should be merged once CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datahub Airflow plugin does not emit task status for UP_FOR_RETRY status
3 participants